Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusable CI actions #3

Merged
merged 8 commits into from
Nov 15, 2023
Merged

Reusable CI actions #3

merged 8 commits into from
Nov 15, 2023

Conversation

vyzaldysanchez
Copy link
Contributor

No description provided.

@vyzaldysanchez vyzaldysanchez changed the title Adds scrub_logs script Reusable CI actions Nov 15, 2023
Comment on lines 68 to 69
aws-role-arn-gati: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN_GATI }}
aws-lambda-url-gati: ${{ secrets.AWS_LAMBDA_URL_GATI }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why mercury uses GATI is because it has to pull the private go dep gokit. Does this repo use any private packages from the smartcontractkit org in GH? If not, we can forego these.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also remove the inputs:

  • aws-region
  • use-gati (defaults to false)

golangci-lint-version: "v1.53.2"
golangci-lint-args: --out-format checkstyle:golangci-lint-report.xml ${{ needs.init.outputs.lint_args_packages }}

ci-lint-charts:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for helm charts (kubernetes). If you don't have any in this repo, you can remove this job enitrely.

Comment on lines +52 to +55
permissions:
id-token: write
contents: read
actions: read

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't need GATI, we can remove this entirely too. These allow us to assume IAM roles in AWS via GitHub's OIDC provider in AWS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By entirely you mean the permissions section?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the default perms should work if we're not needing to assume an AWS IAM role.

Comment on lines 118 to 123
# aws inputs
aws-region: ${{ secrets.AWS_REGION }}
# gati inputs
use-gati: "true"
aws-role-arn-gati: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN_GATI }}
aws-lambda-url-gati: ${{ secrets.AWS_LAMBDA_URL_GATI }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing these if removing in the other action.

uses: smartcontractkit/.github/actions/cicd-build-publish-artifacts-go@main
with:
# general inputs
app-name: mercury-pipeline-${{ matrix.package }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app-name: mercury-pipeline-${{ matrix.package }}
app-name: chainlink-feeds-${{ matrix.package }}

Comment on lines 51 to 55
aws-region: ${{ secrets.AWS_REGION }}
# gati inputs
use-gati: "true"
aws-role-arn-gati: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN_GATI }}
aws-lambda-url-gati: ${{ secrets.AWS_LAMBDA_URL_GATI }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment about GATI applies here

Comment on lines 80 to 85
# aws inputs
aws-region: ${{ secrets.AWS_REGION }}
# gati inputs
use-gati: "true"
aws-role-arn-gati: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN_GATI }}
aws-lambda-url-gati: ${{ secrets.AWS_LAMBDA_URL_GATI }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment about GATI applies here too

gc-host: ${{ secrets.GRAFANA_CLOUD_HOST }}
# aws inputs
aws-region: ${{ secrets.AWS_REGION }}
aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this if pushing docker images to AWS ECR

Comment on lines 196 to 197
git-user: app-token-issuer-data-feeds[bot]
git-email: app-token-issuer-data-feeds[bot]@users.noreply.github.com

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change to a foundations bot?

pnpm-use-cache: false
# aws inputs
aws-region: ${{ secrets.AWS_REGION }}
aws-role-arn: ${{ secrets.AWS_ROLE_ARN_GATI_CHANGESETS }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to setup a GATI to allow changesets to push git tags/create releases/etc

@jmank88 jmank88 merged commit 53434d6 into master Nov 15, 2023
3 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants